/* Exercise x.xx
   ejerx_xx.c */
#include <stdio.h>
#include <math.h>

int isPrime( int number );

/* function main begins program execution */
int main( void )
{
    int c;

    for ( c = 1; c <= 10000; c++ )
        if ( isPrime( c ))
            printf( "%d\n", c );
	return 0; /* indicate that program ended successfully */
} /* end function main */

/* This function tests if a number is a prime number */
int isPrime( int number )
{
    int divisor;

    for ( divisor = 2; divisor <= sqrt( number ); divisor++ )
        if ( number % divisor == 0 )
            return 0;
    return 1;
}
